import service from '@/utils/request'
import {ApiResponse,ListApiResponse} from '@/store/dataType.ts'
export const API_DICT_TYPE = {
  // 查询字典类型列表
  listType:(query:any):Promise<ListApiResponse>=>{return service.get('/system/dict/type/list',{params: query})},
  // 查询字典类型详细
  getType:(dictId:string|number):Promise<ApiResponse>=>{return service.get('/system/dict/type/' + dictId)},
  // 新增字典类型
  addType:(data:any):Promise<ApiResponse>=>{return service.post('/system/dict/type',data)},
  // 更新字典类型
  updateType:(data:any):Promise<ApiResponse>=>{return service.put('/system/dict/type', data)},
  // 删除字典类型
  delType:(dictId:string|number):Promise<ApiResponse>=>{return service.delete('/system/dict/type/' + dictId)},
  // 刷新字典缓存
  refreshCache:():Promise<ApiResponse>=>{return service.delete('/system/dict/type/refreshCache')},
  // 获取字典选择框列表
  optionselect:():Promise<ApiResponse>=>{return service.get('/system/dict/type/optionselect')},
}

export enum DICT_TYPE {

 // ==============工作流=================
   // ========== BPM 模块 ==========
  BPMN_MODEL_TYPE = 'bpmn_model_type',
  BPMN_MODEL_FORM_TYPE = 'bpmn_model_form_type',
  BPMN_PROCESS_INSTANCE_STATUS = 'bpmn_process_instance_status',


  //==================TASK=============
  BPMN_TASK_STATUS = 'bpmn_task_status',
  //=========================监听器==============
  BPMN_PROCESS_LISTENER_TYPE = 'bpmn_process_listener_type',
  BPMN_PROCESS_LISTENER_VALUE_TYPE = 'bpmn_process_listener_value_type',
}

